3.593 \(\int \frac{a+c x^2}{(d+e x) \sqrt{f+g x}} \, dx\)

Optimal. Leaf size=104 \[ -\frac{2 \left (a e^2+c d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{e^{5/2} \sqrt{e f-d g}}-\frac{2 c \sqrt{f+g x} (d g+e f)}{e^2 g^2}+\frac{2 c (f+g x)^{3/2}}{3 e g^2} \]

[Out]

(-2*c*(e*f + d*g)*Sqrt[f + g*x])/(e^2*g^2) + (2*c*(f + g*x)^(3/2))/(3*e*g^2) - (
2*(c*d^2 + a*e^2)*ArcTanh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]])/(e^(5/2)*Sqr
t[e*f - d*g])

_______________________________________________________________________________________

Rubi [A]  time = 0.262637, antiderivative size = 104, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125 \[ -\frac{2 \left (a e^2+c d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{e^{5/2} \sqrt{e f-d g}}-\frac{2 c \sqrt{f+g x} (d g+e f)}{e^2 g^2}+\frac{2 c (f+g x)^{3/2}}{3 e g^2} \]

Antiderivative was successfully verified.

[In]  Int[(a + c*x^2)/((d + e*x)*Sqrt[f + g*x]),x]

[Out]

(-2*c*(e*f + d*g)*Sqrt[f + g*x])/(e^2*g^2) + (2*c*(f + g*x)^(3/2))/(3*e*g^2) - (
2*(c*d^2 + a*e^2)*ArcTanh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]])/(e^(5/2)*Sqr
t[e*f - d*g])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 63.4458, size = 95, normalized size = 0.91 \[ \frac{2 c \left (f + g x\right )^{\frac{3}{2}}}{3 e g^{2}} - \frac{2 c \sqrt{f + g x} \left (d g + e f\right )}{e^{2} g^{2}} + \frac{2 \left (a e^{2} + c d^{2}\right ) \operatorname{atan}{\left (\frac{\sqrt{e} \sqrt{f + g x}}{\sqrt{d g - e f}} \right )}}{e^{\frac{5}{2}} \sqrt{d g - e f}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c*x**2+a)/(e*x+d)/(g*x+f)**(1/2),x)

[Out]

2*c*(f + g*x)**(3/2)/(3*e*g**2) - 2*c*sqrt(f + g*x)*(d*g + e*f)/(e**2*g**2) + 2*
(a*e**2 + c*d**2)*atan(sqrt(e)*sqrt(f + g*x)/sqrt(d*g - e*f))/(e**(5/2)*sqrt(d*g
 - e*f))

_______________________________________________________________________________________

Mathematica [A]  time = 0.228189, size = 92, normalized size = 0.88 \[ \frac{2 c \sqrt{f+g x} (-3 d g-2 e f+e g x)}{3 e^2 g^2}-\frac{2 \left (a e^2+c d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{e} \sqrt{f+g x}}{\sqrt{e f-d g}}\right )}{e^{5/2} \sqrt{e f-d g}} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + c*x^2)/((d + e*x)*Sqrt[f + g*x]),x]

[Out]

(2*c*Sqrt[f + g*x]*(-2*e*f - 3*d*g + e*g*x))/(3*e^2*g^2) - (2*(c*d^2 + a*e^2)*Ar
cTanh[(Sqrt[e]*Sqrt[f + g*x])/Sqrt[e*f - d*g]])/(e^(5/2)*Sqrt[e*f - d*g])

_______________________________________________________________________________________

Maple [A]  time = 0.02, size = 132, normalized size = 1.3 \[{\frac{2\,c}{3\,e{g}^{2}} \left ( gx+f \right ) ^{{\frac{3}{2}}}}-2\,{\frac{cd\sqrt{gx+f}}{g{e}^{2}}}-2\,{\frac{cf\sqrt{gx+f}}{e{g}^{2}}}+2\,{\frac{a}{\sqrt{ \left ( dg-ef \right ) e}}\arctan \left ({\frac{\sqrt{gx+f}e}{\sqrt{ \left ( dg-ef \right ) e}}} \right ) }+2\,{\frac{c{d}^{2}}{{e}^{2}\sqrt{ \left ( dg-ef \right ) e}}\arctan \left ({\frac{\sqrt{gx+f}e}{\sqrt{ \left ( dg-ef \right ) e}}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c*x^2+a)/(e*x+d)/(g*x+f)^(1/2),x)

[Out]

2/3*c*(g*x+f)^(3/2)/e/g^2-2/g*c/e^2*d*(g*x+f)^(1/2)-2/g^2*c/e*f*(g*x+f)^(1/2)+2/
((d*g-e*f)*e)^(1/2)*arctan((g*x+f)^(1/2)*e/((d*g-e*f)*e)^(1/2))*a+2/e^2/((d*g-e*
f)*e)^(1/2)*arctan((g*x+f)^(1/2)*e/((d*g-e*f)*e)^(1/2))*c*d^2

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + a)/((e*x + d)*sqrt(g*x + f)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.291061, size = 1, normalized size = 0.01 \[ \left [\frac{3 \,{\left (c d^{2} + a e^{2}\right )} g^{2} \log \left (\frac{\sqrt{e^{2} f - d e g}{\left (e g x + 2 \, e f - d g\right )} - 2 \,{\left (e^{2} f - d e g\right )} \sqrt{g x + f}}{e x + d}\right ) + 2 \,{\left (c e g x - 2 \, c e f - 3 \, c d g\right )} \sqrt{e^{2} f - d e g} \sqrt{g x + f}}{3 \, \sqrt{e^{2} f - d e g} e^{2} g^{2}}, -\frac{2 \,{\left (3 \,{\left (c d^{2} + a e^{2}\right )} g^{2} \arctan \left (-\frac{e f - d g}{\sqrt{-e^{2} f + d e g} \sqrt{g x + f}}\right ) -{\left (c e g x - 2 \, c e f - 3 \, c d g\right )} \sqrt{-e^{2} f + d e g} \sqrt{g x + f}\right )}}{3 \, \sqrt{-e^{2} f + d e g} e^{2} g^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + a)/((e*x + d)*sqrt(g*x + f)),x, algorithm="fricas")

[Out]

[1/3*(3*(c*d^2 + a*e^2)*g^2*log((sqrt(e^2*f - d*e*g)*(e*g*x + 2*e*f - d*g) - 2*(
e^2*f - d*e*g)*sqrt(g*x + f))/(e*x + d)) + 2*(c*e*g*x - 2*c*e*f - 3*c*d*g)*sqrt(
e^2*f - d*e*g)*sqrt(g*x + f))/(sqrt(e^2*f - d*e*g)*e^2*g^2), -2/3*(3*(c*d^2 + a*
e^2)*g^2*arctan(-(e*f - d*g)/(sqrt(-e^2*f + d*e*g)*sqrt(g*x + f))) - (c*e*g*x -
2*c*e*f - 3*c*d*g)*sqrt(-e^2*f + d*e*g)*sqrt(g*x + f))/(sqrt(-e^2*f + d*e*g)*e^2
*g^2)]

_______________________________________________________________________________________

Sympy [A]  time = 17.4424, size = 245, normalized size = 2.36 \[ \frac{2 c \left (f + g x\right )^{\frac{3}{2}}}{3 e g^{2}} - \frac{2 c \sqrt{f + g x} \left (d g + e f\right )}{e^{2} g^{2}} - \frac{2 \left (a e^{2} + c d^{2}\right ) \left (\begin{cases} \frac{\operatorname{atan}{\left (\frac{1}{\sqrt{\frac{e}{d g - e f}} \sqrt{f + g x}} \right )}}{\sqrt{\frac{e}{d g - e f}} \left (d g - e f\right )} & \text{for}\: \frac{e}{d g - e f} > 0 \\- \frac{\operatorname{acoth}{\left (\frac{1}{\sqrt{- \frac{e}{d g - e f}} \sqrt{f + g x}} \right )}}{\sqrt{- \frac{e}{d g - e f}} \left (d g - e f\right )} & \text{for}\: \frac{1}{f + g x} > - \frac{e}{d g - e f} \wedge \frac{e}{d g - e f} < 0 \\- \frac{\operatorname{atanh}{\left (\frac{1}{\sqrt{- \frac{e}{d g - e f}} \sqrt{f + g x}} \right )}}{\sqrt{- \frac{e}{d g - e f}} \left (d g - e f\right )} & \text{for}\: \frac{e}{d g - e f} < 0 \wedge \frac{1}{f + g x} < - \frac{e}{d g - e f} \end{cases}\right )}{e^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x**2+a)/(e*x+d)/(g*x+f)**(1/2),x)

[Out]

2*c*(f + g*x)**(3/2)/(3*e*g**2) - 2*c*sqrt(f + g*x)*(d*g + e*f)/(e**2*g**2) - 2*
(a*e**2 + c*d**2)*Piecewise((atan(1/(sqrt(e/(d*g - e*f))*sqrt(f + g*x)))/(sqrt(e
/(d*g - e*f))*(d*g - e*f)), e/(d*g - e*f) > 0), (-acoth(1/(sqrt(-e/(d*g - e*f))*
sqrt(f + g*x)))/(sqrt(-e/(d*g - e*f))*(d*g - e*f)), (e/(d*g - e*f) < 0) & (1/(f
+ g*x) > -e/(d*g - e*f))), (-atanh(1/(sqrt(-e/(d*g - e*f))*sqrt(f + g*x)))/(sqrt
(-e/(d*g - e*f))*(d*g - e*f)), (e/(d*g - e*f) < 0) & (1/(f + g*x) < -e/(d*g - e*
f))))/e**2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.301089, size = 144, normalized size = 1.38 \[ \frac{2 \,{\left (c d^{2} + a e^{2}\right )} \arctan \left (\frac{\sqrt{g x + f} e}{\sqrt{d g e - f e^{2}}}\right ) e^{\left (-2\right )}}{\sqrt{d g e - f e^{2}}} - \frac{2 \,{\left (3 \, \sqrt{g x + f} c d g^{5} e -{\left (g x + f\right )}^{\frac{3}{2}} c g^{4} e^{2} + 3 \, \sqrt{g x + f} c f g^{4} e^{2}\right )} e^{\left (-3\right )}}{3 \, g^{6}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x^2 + a)/((e*x + d)*sqrt(g*x + f)),x, algorithm="giac")

[Out]

2*(c*d^2 + a*e^2)*arctan(sqrt(g*x + f)*e/sqrt(d*g*e - f*e^2))*e^(-2)/sqrt(d*g*e
- f*e^2) - 2/3*(3*sqrt(g*x + f)*c*d*g^5*e - (g*x + f)^(3/2)*c*g^4*e^2 + 3*sqrt(g
*x + f)*c*f*g^4*e^2)*e^(-3)/g^6